package cn.yang.controller;

import cn.yang.domain.TVehicle;
import cn.yang.service.TVehicleService;

import com.zhentao.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import cn.yang.service.TVehicleService;
import com.zhentao.nlz.project.dto.DictionaryDto;
import com.zhentao.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/vehicle")
public class TVehicleController {


    @Autowired
    private TVehicleService vehicleService;


    @GetMapping("/list")
    public Result list(){
        System.out.println(12312312);
        return vehicleService.PageVehicle();
    }
    @PostMapping("add")
    public Result add(TVehicle vehicle){
        return Result.success(vehicleService.savevehicle(vehicle));
    }
}
